package enum

type SortDirection string

const (
	ASC    SortDirection = "ASC"
	DESC SortDirection = "DESC"
)

func (o SortDirection) String() string {
	switch o {
	case ASC:
		return "ASC"
	case DESC:
		return "DESC"
	default:
		return "unknown"
	}
}

func (o SortDirection) Valid() bool {
	if o.String() == "unknown" {
		return false
	}
	return true
}